package com.xiaoyu.awakening.common.core.exception.status;

import com.xiaoyu.awakening.common.core.exception.status.IReturnCode;
import lombok.AllArgsConstructor;

/**
 * 通用异常代码定义
 *
 * @author wangxiaoyu
 * @since v1.0
 */
@AllArgsConstructor
public enum CommonReturnCode implements IReturnCode {
    //success
    C000000("000000", "操作成功", IReturnCode.COMMON_PREFIX),
    // failed
    C999999("999999", "操作失败", IReturnCode.COMMON_PREFIX);

    final String code;
    final String message;
    final String series;

    @Override
    public String getMessage() {
        return this.message;
    }

    @Override
    public String getCode() {
        return this.series + this.code;
    }
}
